﻿<?php
session_start();
if (!isset($_SESSION['usuario'])) {
    header('Location: ../viewer/vLogin.php');
}

include_once '../db/DBConnection.php';
DataBase::createConection();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php require("../viewer/vLayoutHead.php"); ?>
    </head>
    <body>

        <?php require("../viewer/vLayoutBody.php"); ?>


        <div id="side-col">
            <form name="cadastroProdutos" action="../controller/cCadastroProdutos.php" method="POST" enctype="multipart/form-data">
                <p>Nome: </p><input type="text" id="nome" name="nome" size="30" value="" maxlength="100" required placeholder="Nome do Produto"/>
                <p>Descrição: </p><textarea id="descricao" style="resize: none;" name="descricao" size="280" value="" maxlength="1200" cols="45" rows="10" required placeholder="Descrição do Produto"></textarea>
                <p>Preço: <input type="text" id="preco" name="preco" size="5" value="0.00" maxlength="5" required>
                <p>Imagem: <input type="file" id="file" name="file"/></p>

                <p><input type="submit" class="button black" value="Enviar"/>
            </form>
            <a href="../viewer/vIndex.php" class="button black">Voltar</a></p>
        </div>
    </body>
    <footer>
        <?php require("../viewer/vLayoutFooter.php"); ?>
    </footer>
</html>